<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>审核记录</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../../res/layuis/css/layui.css">
   <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
   <script type="text/javascript" src="../../res/layuis/layui.js" charset="utf-8"></script>
</head>
<body>
<div class="demoTable" style="margin-top: 10px;">
<table class="layui-table"  lay-filter="demo" id="materialAuditingDetail">
   
</table>
<script type="text/javascript">
/**
 * 从地址栏传值的代码
 * @param param
 * @returns
 */

function getParameter(param){
	var query = window.location.search;
	var iLen = param.length;
	var iStart = query.indexOf(param);
	if (iStart == -1)
		return "";
	iStart += iLen + 1;
	var iEnd = query.indexOf("&", iStart);
	if (iEnd == -1)
		return query.substring(iStart);
	return query.substring(iStart, iEnd);
}
layui.use('table',function(){
	  var table = layui.table;
	  var form = layui.form;
	  
	  table.render({
		    elem: '#materialAuditingDetail'
		   	,page: true
		    ,url:'../../listenAuditing//findAuditing.action?vocationalWorkId='+getParameter("purchaseId")
		    ,cols: [[
		       {field:'auditingId', align:'center'}
		      ,{field:'vocationalWorkId', align:'center'}
		      ,{field:'auditingDepartment',title: '审核部门', align:'center',width:'16%'}
		      ,{field:'auditingOrder',title: '审核订单', align:'center',width:'16%'}
		      ,{field:'auditingTimeString',title: '审核时间', align:'center',width:'16%',sort:true}
		      ,{field:'auditingStatus',title: '审核状态', align:'center',templet:'#auditingType',width:'20%'}
		      ,{field:'auditingExplain',title: '审核意见说明', align:'center',width:'26%'}
		    ]],done: function (res, curr, count) {
	            $("[data-field='auditingId']").css('display','none');
	            $("[data-field='vocationalWorkId']").css('display','none');
		    }
		  });
	  
	 
});
</script>
<script type="text/html" id="auditingType">
{{# if(d.auditingStatus == 1) { }}
     <div>已通过财务审核</div>
 	 {{# } else if(d.auditingStatus == 2){ }}
    <div>已通过经理审核</div>
     {{# } else if(d.auditingStatus == 3){ }}
    <div>未通过审核</div>
{{# }}}
</script>
 </div>
<script src="../../res/js/materialAuditing/materialAuditingDetail.js" charset="utf-8"></script>

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

</body>
</html>